package com.tvein.system.controller
{
	//flash
	//pureMVC
	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
	//custom
	import com.tvein.system.common.CommonConstants;
	import com.tvein.System;
	import com.tvein.system.model.ServerProxy;
	import com.tvein.system.model.FilesProxy;
	import com.tvein.system.view.ApplicationMediator;
	import com.tvein.system.view.SystemMediator;
	import com.tvein.system.view.FileLoaderMediator;
//
	public class StartupCommand extends SimpleCommand implements ICommand
	{
		override public function execute(notification:INotification) : void
		{
			var system:System = notification.getBody() as System;
			
			facade.registerProxy(new ServerProxy());
			facade.registerProxy(new FilesProxy());
			
			facade.registerMediator(new SystemMediator());
			facade.registerMediator(new FileLoaderMediator());
			facade.registerMediator(new ApplicationMediator(system));
		}
	}
}